using System.Collections.Generic;

namespace SharpObjects.XpathToObjects_Test
{
    public class DataModel
    {
        public string Message { get; set; }
        public List<string> Options { get; set; }
        public string[] AvailableRoles { get; set; }
        public List<UserInfo> Users { get; set; }
        public Dictionary<string, string> Organizations { get; set; }

        public void Initialize1()
        {
            this.Message = "1.This is a global message";

            this.Options = new List<string>() { "Option 1.1", "Option 1.2", "Option 1.3" };

            this.AvailableRoles = new string[] { "Role 1.1", "Role 1.2", "Role 1.3", "Role 1.4" };

            this.Users = new List<UserInfo>()
                             {
                                 new UserInfo()
                                     {
                                         FirstName = "1.John",
                                         LastName = "1.Smith",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[1]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "1.Jack",
                                         LastName = "1.Adams",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[2]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "1.Daniel",
                                         LastName = "1.Woods",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[3]}
                                     }
                             };

            this.Organizations = new Dictionary<string, string>();
            this.Organizations["org1"] = "1.Default Organization";
            this.Organizations["org2"] = "1.Development Organization";
        }

        public void Initialize2()
        {
            this.Message = "2.This is a global message";

            this.Options = new List<string>() { "Option 2.1", "Option 2.2", "Option 2.3" };

            this.AvailableRoles = new string[] { "Role 2.1", "Role 2.2", "Role 2.3", "Role 2.4" };

            this.Users = new List<UserInfo>()
                             {
                                 new UserInfo()
                                     {
                                         FirstName = "2.John",
                                         LastName = "2.Smith",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[1]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "2.Jack",
                                         LastName = "2.Adams",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[2]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "2.Daniel",
                                         LastName = "2.Woods",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[3]}
                                     }
                             };

            this.Organizations = new Dictionary<string, string>();
            this.Organizations["org1"] = "2.Default Organization";
            this.Organizations["org2"] = "2.Development Organization";
        }

        public void Initialize3()
        {
            this.Message = "3.This is a global message";

            this.Options = new List<string>() { "Option 3.1", "Option 3.2", "Option 3.3" };

            this.AvailableRoles = new string[] { "Role 3.1", "Role 3.2", "Role 3.3", "Role 3.4" };

            this.Users = new List<UserInfo>()
                             {
                                 new UserInfo()
                                     {
                                         FirstName = "3.John",
                                         LastName = "3.Smith",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[1]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "3.Jack",
                                         LastName = "3.Adams",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[2]}
                                     },
                                 new UserInfo()
                                     {
                                         FirstName = "3.Daniel",
                                         LastName = "3.Woods",
                                         Roles = new string[] {this.AvailableRoles[0], this.AvailableRoles[3]}
                                     }
                             };

            this.Organizations = new Dictionary<string, string>();
            this.Organizations["org1"] = "3.Default Organization";
            this.Organizations["org2"] = "3.Development Organization";
        }
    }


}